<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="mvc" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>修理厂信息录入</title>

</head>
<body>

<form action="<%=request.getContextPath()%>/repair/save" method="post">

<c:if test="${!empty model}">
	<input type="hidden" name="id" value="${model.id }"/>
</c:if>
	
<table>
	<caption>修理厂信息</caption>

	<tr>
		<td>名称</td>
		<td><input type="text" name="name" value="${model.name }"></td>
	</tr>
	<tr>
		<td>电话</td>
		<td><input type="text" name="tel" value="${model.tel }"></td>
	</tr>
	<tr>
		<td>类型</td>
		<td>
			<select name="type">
				<c:forEach items="${types}" var="t">
					<option value="${t.key }" ${t.key==model.type?'selected="selected"':'' }>${t.value }</option>
				</c:forEach>
			</select>
		</td>
	</tr>
	<tr>
		<td colspan="2" style="text-align: center;">
			<input type="submit" value="保存" />
			<input type="button" value="取消" onclick="history.back()" />
		</td>
	</tr>
</table>

</form>

</body>
</html>